package b4.util.basic
{
	import flash.utils.*;
	
	public class BTime
	{
		private static var serverTime:int;
		private static var clientTime:int; 
		
		public function BTime()
		{
		}
		
		public static function setServerTime(timeStamp:int):void
		{
			serverTime = timeStamp;
			clientTime = getTimer() / 1000;
		}
		
		//模拟的当前的服务器系统时间(秒)
		public static function currentSeconds():int
		{
			return serverTime + getTimer() / 1000 - clientTime; 
		}
		
		//当前天数
		public static function currentDays():int
		{
			return currentSeconds() / 3600 / 24;
		}
		

	}
}